/**
 * @功能描述: 基础表单样式文件
 * @author: lzn
 * @date: 2022-09-28 10:02:39
 * @version: 1.0
 */
@import '../../style/index.scss';

@include b(base-form) {

}

// 表单项容器样式
@include b(form-item) {
  margin: 0 0 24px;
}

// 表单项标题容器
@include b(form-item-label) {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
  // 标题样式
  >label {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    height: 100%;
    // 必选项前的'*'
    &.item-required::before {
      display: inline-block;
      margin-right: 4px;
      color: #ff4d4f;
      font-family: SimSun,sans-serif;
      line-height: 1;
      content: "*";
    }
    // 自动标题后加':'并调整margin
    &::after {
      content: ":";
      position: relative;
      top: -0.5px;
      margin: 0 8px 0 2px;
    }
  }
}

// 表单项内容容器
@include b(form-item-control) {
  position: relative;
  // 表单项内容样式
  .form-item-content {
    position: relative;
    display: flex;
    align-items: center;
  }
  // 校验错误边框样式
  .status-error {
    border-color: $color-error;
  }
  // 校验错误信息提示样式
  .error-message {
    position: absolute;
    color: $color-error;
  }
}